import { getAllCate } from '@/api/content/article'

const state = {
  allCate: []
}

const mutations = {
  updateAllCate(state, allCate) {
    state.allCate = allCate
  }
}
// 获取所有分类列表
const actions = {
  async getAllCate(context) {
    const allCate = await getAllCate()
    context.commit('updateAllCate', allCate)
  }
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}

